export const getPersonHonorOption = () => {
  return {
    tooltip: {
      trigger: "item",
      formatter: "{a} <br/>{b}: {c} ({d}%)",
    },
    title: {
      text: "荣誉个人/集体比例",
      top: 20,
      left: "center",
      textStyle: {
        fontSize: 20,
        color: "#fff",
      },
    },
    color: ["#00E7E5", "#1DBEFF"],
    legend: {
      orient: "horizontal",
      bottom: 10,
      textStyle: {
        color: "#fff",
        padding: [5, 5, 5, -42],
        fontWeight: 400,
      },
      itemWidth: 50,
      itemHeight: 22,
    },
    series: [
      {
        radius: 80,
        name: "荣誉个人/集体比例",
        type: "pie",
        labelLine: {
          length: 40,
          length2: 85,
        },
        itemStyle: {
          borderWidth: 1,
          shadowBlur: 20,
          shadowOffsetY: 5,
        },
        label: {
          show: true,
        },
        avoidLabelOverlap: true,
        data: [
          {
            value: 70,
            name: "个人",
            selected: true,
            itemStyle: {
              color: "#129E92",
              borderColor: "#3FFFE2",
              shadowColor: "rgba(63, 255, 226, 0.5)",
            },
            label: {
              color: "#1890ff",
              formatter(param: any) {
                return (
                  param.name +
                  " (" +
                  ((param.percent / 100) * 100).toFixed(2) +
                  "%)"
                );
              },
            },
            labelLine: {
              lineStyle: {
                color: "#00EAE8",
              },
              length: 15,
              length2: 15,
            },
          },
          {
            value: 100,
            name: "集体",
            itemStyle: {
              color: "#105BA4",
              borderColor: "#31B4FF",
              shadowColor: "rgba(49, 180, 255, 0.8)",
            },
            label: {
              color: "#1890ff",
              formatter(param: any) {
                return param.name + " (" + ((param.percent / 100) * 100).toFixed(2) + "%)";
              },
            },
            labelLine: {
              lineStyle: {
                color: "#07D2FF",
              },
              length: 15,
              length2: 15,
            },
          },
        ],
      },
    ],
  };
};
